<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" href="/erp/css/style.css" type="text/css"/>
</head>
<body>
<table border="1" align="center" cellspacing="0" cellpadding="0" width="100%">
    <tr>
        <th>ID</th>
        <th>用户名</th>
        <th>昵 称</th>
        <th>管理员</th>
        <th>启 用</th>
        <th>删 除</th>
        <th width="20%">操 作</th>
    </tr>
    <c:forEach items="${users}" var="st">
        <tr>
            <td>${st.id}</td>
            <td>${st.username}</td>
            <td>${st.nickName}</td>
            <td><c:if test="${st.isAdmin==0}">否</c:if>
                <c:if test="${st.isAdmin==1}">是</c:if>
            </td>
            <td><c:if test="${st.state==0}">可用</c:if>
                <c:if test="${st.state==1}">禁用</c:if>
            </td>
            <td><c:if test="${st.deleted==0}">未删</c:if>
                <c:if test="${st.deleted==1}">已删</c:if>
            </td>
            <td align="center"><a class="button white" href="${pageContext.request.contextPath}/userCtrl?parm=toEdit&id=${st.id}">修改</a>&nbsp;&nbsp;
                <a class="button white" href="${pageContext.request.contextPath}/userCtrl?parm=delete&id=${st.id}"
                   onclick="return confirm('确定删除？');">删除</a></td>
        </tr>
    </c:forEach>

</table>
<div align="center">
    <a class="button blue" href="${pageContext.request.contextPath}/user/add.jsp">新 增</a>
</div>
</body>
</html>
